<{include file="Order/top.html" }>
</head>
<body>
<{include file="wap_index_top.html" }>
<ul class="tabs" >
    <li <{if $my == 0}>class="cur"<{/if}>><a href="<{if $my == 1}><{U('Events/index')}><{/if}>">所有活动</a></li>
    <li <{if $my == 1}>class="cur"<{/if}>><a href="<{if $my == 0}><{U('Events/index')}>&my=1<{else}>javascript:void(0);<{/if}>">我的活动</a></li>
</ul>
<ul class="hyhd_box">
    <{include file="Events/more.html" }>
</ul>
<{include file="signBody.html"}>
<{include file="../footer.html" }>
</body>
</html>
<script src="<{$preStaticUrl}>js/flexible.js"></script>
<script type="text/javascript" src="<{$preStaticUrl}>js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="<{$preStaticUrl}>js/jquery.touchSlider.js"></script>
<script type="text/javascript">
    var loadMore = "<{U('Events/loadMore')}>&my=<{$my}>";
    var page = 2;
    var loadFlag = 1;

    $(function(){
        $(window).scroll(function() {
            //当内容滚动到底部时加载新的内容
            if ($(this).scrollTop() + $(window).height() + 20 >= $(document).height() && $(this).scrollTop() > 20) {
                //当前要加载的页码
                if(loadFlag) {
                    loadFlag = 0;
                    loadObj = layer.load(2);
                    $.getJSON(loadMore, {page: page}, function (data) {
                        layer.close(loadObj);
                        if (data.status != 0) {
                            layer.msg("数据获取失败，请稍后重试或联系管理员解决！");
                        } else {
                            ++page;
                            $(".hyhd_box").append(data.dataHTML);
                            fixUserHead();
                            if (data.isPage) loadFlag = 1;
                        }
                    });
                }
            }
        });
    });

</script>
